<!-- <script>

    function login(){
        var mobilenum = $('input[name="mobilenum"]').val();
       var userpass = $('input[name="userpass"]').val();
       var captcha = $('input[name="captcha"]').val();
       var url =  $('input[name="log"]').val();
       $.ajax({
           type : "POST",
            url : url,
            data : {moblienum:$mobilenum,userpass:$userpass,captcha:captcha},
            dataType : 'json',
            success : function(res) {
                if(res.status == 1){
                    alert(res.info);
                    window.location.href = res.url;
                }else{
                    alert(res.info);
                }
            }

        })
	}
</script> -->
<div class="header" id="ban">
		<div class="container">
		  <div>
	       <img src="__PUBLIC__/static/home/images/logo.png">
          </div>
			<div class="head-left wow fadeInLeft animated animated" data-wow-delay=".5s" style="visibility: visible; animation-delay: 0.5s; animation-name: fadeInLeft; margin-top: -70px;margin-left: 700px;">
				<div class="header-search">
						<div class="search">
							<input class="search_box" type="checkbox" id="search_box">
							<label class="icon-search" for="search_box"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></label>
							<div class="search_form">
								<form action="{:url('Index/search')}" method="post">
									<input type="text" name="Search" placeholder="吃点啥...." required="" style="  background: #d8d5d5;border: 1px solid #d8d5d5;width: 300px;margin-left: 70px">
									<select name="select" style="height:40px;width: 70px;position: absolute;top: 10px;left: 5px">
										<option value="" style="font-size: 10px">请选择</option>
										<option value="0">店铺</option>
										<option value="1">美食</option>
									</select>
									<input type="submit" value="搜索" style="background: #f74a2a;border: 1px solid #f74a2a;border-radius: 4px"></a>
								</form>
							</div>
						</div>
				</div>
			</div>
			<div class="header_right wow fadeInLeft animated animated" data-wow-delay=".5s" style="visibility: visible; animation-delay: 0.5s; animation-name: fadeInLeft;margin-top: -60px;margin-left: 850px;width: 1000px;">
			<nav class="navbar navbar-default">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
				</div>

				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse nav-wil" id="bs-example-navbar-collapse-1">
					<nav class="link-effect-7" id="link-effect-7">
						<ul class="nav navbar-nav">
							<li class="active act"><a href="{:url('Index/index')}">主页</a></li>
							<li><a href="{:url('Shop/lists')}">餐厅饭馆</a></li>
							<!-- <li><a href="{:url('User/userinfo')}">餐厅饭馆</a></li> -->
							<!-- <li><a href="{:url('User/shoppingcart')}">购物车</a></li> -->
						</ul>
					</nav>
				</div>
				<!-- /.navbar-collapse -->
			</nav>
			</div>

			<div id="social-icons" style="position:relative; float: right;margin-top: -60px;display:inline;" >

<!--<script type="text/javascript">-->
 <div id="wrapper" >




 {if condition="$Think.session.id eq null"}
<div class="box" style="display: inline-block;">

        <li><a href="#" class="rollIn" style="font-family: miaomi ;font-weight: bold;font-size: 15px">登录</a>
		</li>
		
		  

	<div id="dialogBg"></div>
		<div id="dialog" class="animated">
			<div class="dialogTop">
				<a href="#" style="font-size: 20px; margin-right: 20px;font-family: miaomi;float: left;">Hi~咱们又见面了</a>
				<a href="javascript:;" class="claseDialogBtn" style="font-size: 15px; font-family: miaomi;">关闭</a>
			</div>
			<form action="{:url('Login/login')}" method="post" id="editForm">
				<ul class="editInfos" style="font-family: miaomi;">
					<li><input type="text" name="mobilenum"   value="" class="ipt" style="width: 200px;" placeholder="手机号码" required  /></li>
					<li><input type="password" name="userpass"  value="" class="ipt" style="width: 200px;" placeholder="密码" required  /></li>
					<li><input type="text" name="captcha"   class="ipt" style="width: 200px;" placeholder="验证码" required />
					<img src="{:captcha_src()}" alt="captcha" onclick="this.src='{:captcha_src()}'" style="height: 50px;margin-top: 20px;" /></li>
					<li><button type="submit" class="submitBtn" onclick="login()">登录</button><a href="{:url('Index/findPasswordByEmail')}" style="margin-left: 20px">找回密码</a></li>
					<li><checkbox type="submit" name="check" value="1"></checkbox></li>
					<input type="hidden" value="{:url('Login/login')}" name="log"  />
				</ul>
			</form>
		</div>    
	</div>


	{else /}
		<span><a href="{:url('User/userinfo')}"  style="font-family: miaomi;font-weight: bold;font-size: 15px;margin-right: 0px;position: relative;top: 3em">{$Think.session.username}</a>
		</span>
	{/if}

	<!-- 注册模态框 -->
	{if condition="$Think.session.id eq null"}
	<div class="box1" style="display: inline-block">
		
		<li><a href="#" class="bounceIn" style="font-family: miaomi ;font-weight: bold;font-size: 15px;">注册</a></li>
		
		
		<div id="dialogBg1"></div>
		<div id="dialog1" class="animated1">
			<div class="dialogTop">
			    <a href="#" style="font-size: 20px; margin-right: 20px;font-family: miaomi;float: left;">快来加入我们吧</a>
				<a href="javascript:;" class="claseDialogBtn1" style="font-size: 15px; font-family: miaomi;">关闭</a>
			</div>
			<form action="{:url('User/adduser')}" method="post" id="editForm1" enctype="multipart/form-data">
			  <ul class="editInfos" style="font-family: miaomi;">
				 <!-- <li><label><font color="#ff0000">* </font>手&nbsp机&nbsp号&nbsp
				 <input type="text" name="telephone" pattern="[0-9]{11}" required id="telephone" onblur="checkTele()"  class="ipt" />
				 <span id="tip" ></span></label></li>
					<li><label><font color="#ff0000">* </font>邮&nbsp&nbsp&nbsp&nbsp&nbsp箱&nbsp<input type="text" name="" required value="" class="ipt" /></label></li>
					<li><label><font color="#ff0000">* </font>用&nbsp户&nbsp名&nbsp<input type="text" name="" required value="" class="ipt" /></label></li>
					<li><label><font color="#ff0000">* </font>密&nbsp&nbsp&nbsp&nbsp&nbsp码&nbsp<input type="text" name="" required value="" class="ipt" /></label></li>
					<li><label><font color="#ff0000">* </font>确认密码<input type="text" name="" required value="" class="ipt" /></label></li> -->
					<li><input type="text" name="username" value="" class="ipt" style="width: 200px;" placeholder="用户名" required  /></li>
					<li><input type="password" name="userpass" value="" class="ipt" style="width: 200px;" placeholder="密码" required  /></li>
					<li><input type="password" name="userpass1" value="" class="ipt" style="width: 200px;" placeholder="确认密码" required  /></li>
					<li><input type="text" name="mobilenum" value="" class="ipt" style="width: 200px;" placeholder="手机号" required  /></li>
				    <li><input type="text" name="address" value="" class="ipt" style="width: 200px;" placeholder="送餐地址" required  /></li>
					<li><input type="text" name="email" value="" class="ipt" style="width: 200px;" placeholder="邮箱" required  /></li>
					<li style="margin-left: 40px" class="file">
                    <input type="file" name="pic" class="ipt" style="width: 200px;" title="头像"  /></li>
				  <li><input type="text" name="comment" value="" class="ipt" style="width: 200px;" placeholder="备注"  /></li>
					<li><input type="text" name="captcha"  class="ipt" style="width: 200px;" placeholder="验证码" required />
					<img src="{:captcha_src()}" alt="captcha" onclick="this.src='{:captcha_src()}'" style="height: 50px;margin-top: 20px;" /></li>
                  <li><button type="submit" class="submitBtn">注册</button></li>
				</ul>
			</form>
		</div>
	</div>
{else/}
		
		<span>
			<div  style="width: 50px;">
             <a href="{:url('User/userinfo')}">
                  <img src="__PUBLIC__/static/home/uploads/userpic/{$Think.session.pic}" class="img-responsive"
                  alt="" style="height: 40px;width: 40px;position: relative;top: -2em">
              </a>
        </div>
		</span>
              
                                   
        

	{/if}



</div> 
<div class="clearfix"> </div>	

						
					
						
					</ul>
				</div>
			
			<div class="clearfix"> </div>	
		</div>
	</div>
